<script type="text/javascript">


function validate(rel)
{
	jConfirm('Can you confirm this?', 'Confirmation Dialog', function(r) {
		if(r==true){

			
			var url = "/admin/roomcats/delete/roomcat_id/"+rel; 
		
			$(location).attr('href',url);

		}
		else
		{
		}
	});
}
</script>

<div id="topsubmenu"><a href="/admin/roomcats/add/">Add New</a></div>
 
<table>
<?php foreach($this->roomcats_arr as $roomcats_entry) :?>
<tr>
    <td><?php echo $roomcats_entry['roomcat_dsc'];?></td>

    <td>
        <a href="<?php echo $this->url(array('controller'=>'Roomcats', 
            'action'=>'edit', 'roomcat_id'=>$roomcats_entry['roomcat_id']));?>">Edit</a>
        <a rel="<?php echo $roomcats_entry['roomcat_id'];?>" onclick="validate(this.rel)" href="#">Delete</a>
        
     </td>   
</tr>
<?php endforeach; ?>
</table>